<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>投诉记录</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/page.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/media.js"></script>
    <script src="../js/common.js"></script>
    <style>
    		body{
    			background: rgb(248,248,248);
    		}
		.jietu{
			width:100%;
			
		}
		.jietu .title{
		    font-size: .12rem;
		    color: #5f3104;
		}
		.jietu .imgbox{
			text-align: center;
		}
		.jietu img{
		    width: 2.4rem;
		    height: 2.4rem;
		    
		}
		#reason{
			color:#666;
		}
		.backbtn{
			width:1rem;
			height:0.2rem;
			border-radius:0.4rem;
			background:#5F3104;
			color:#fff;
			font-size: 0.12rem;
			text-align: center;
			line-height:0.2rem;
			margin:0.2rem auto;
		}
		.Complaints-recording .section2 {
		    margin-top: .08rem;
		    padding-bottom: 0.08rem;
		    background: #fff;
		}
		.tousu_con{
			color:#666;
		}
    </style>
</head>

<body>
    <!--头部-->
    <div class="public-header flex">
        <!--<span class="public-header-left-search"></span>-->
        <span class="public-header-left-back"></span>
        <span class="public-header-center">投诉记录</span>
        <span class="public-header-right"></span>
    </div>

    <!--正文-->
    <div class="Complaints-recording bc-gray">
        <div class="section1">
            <div class="top">
                <div class="d1">
                    <img src="" alt="" id="addimg" />
                    <div class="word" id="addmain"></div>
                </div>
                <div class="touphone">
                		<p><span>投诉人电话</span></p>
                		<div class="tousu_con tousu_phone"></div>
                </div>
                <p>
                    <span>投诉原因</span>
                    <em class="cuowustyle">分类错误</em>
                    <i id="tstime">09:41</i>
                </p>
                <div class="d0" id="reason">
                    分类错误内容
                </div>
               <!-- <font>完成</font>-->
            </div>
            <div class="jietu">
            		<p class="title">证据截图</p>
           	 	<div class="imgbox">
	            		<!--<img src="" alt="" />   	 	-->	
           	 	</div>
            </div>
        </div>
        <div class="section2">
            <p><span>处理结果</span><em class="progress_status"></em></p>
            <ul>
                <li>
                    <p class="flex"><span class="c1">平台</span><em></em><i class="tousu_con tousu_fank"></i></p>
                    <p class="tousu_time"></p>
                </li>
            </ul>
        </div>
        <div class="backbtn">返回</div>
    </div>
    <script>
        function fmtDate(obj){
            var date =  new Date(obj);
            var y = 1900+date.getYear();
            var m = "0"+(date.getMonth()+1);
            var d = "0"+date.getDate();
            return y+"-"+m.substring(m.length-2,m.length)+"-"+d.substring(d.length-2,d.length);
        };
        $.ajax({
            url:base_url+"ZITAOHUI/complaintDetial",
            type:"post",
            data:{
                complaintId:getQueryString("id")
            },
            dataType:"json",
            success:function (data){
                var _ds = data.extend.data[0];
                $('#addimg').attr('src',_ds.image);//投诉商品的信息
                $("#addmain").text(_ds.title)
                $(".cuowustyle").text(_ds.reason);//投诉的类型
                $('#reason').text(_ds.description);//投诉的描述
                var tstime = fmtDate(_ds.add_date);//投诉的事件
                $("#tstime").text(tstime);
                for(var i=1;i<4;i++){
                		if(_ds['img'+i]){
                			$('.imgbox').append('<img src="'+_ds['img'+i]+'" />');//渲染证据截图
                		}
                };
                if(_ds.result==0){
                		$('.progress_status').text('待处理');//
                		$('.tousu_fank').text('请耐心等待。');
                }else if(_ds.result==1){
                		$('.progress_status').text('通过');//
                		$('.tousu_fank').text('您的投诉已受理');
                }else if(_ds.result==2){
                		$('.progress_status').text('驳回');//
                		$('.tousu_fank').text(_ds.result_msg);
                };
               	$('.tousu_phone').text(_ds.contact_phone);//投诉电话
               	if(_ds.update_time){
               		$('.tousu_time').text(fmtDate(_ds.update_time));//处理时间
               	}else{
               		$('.tousu_time').text(fmtDate(_ds.add_date));//处理时间
               	}
               	
            }
        });
        $('.backbtn').click(function(){
        		window.location.href="../wode/Sellers-center.html";//返回主页面
        })
    </script>



</body>

</html>